/*
 * Created on 2005-5-31
 *
 * TODO To change the template for this generated file go to
 * Window - Preferences - Java - Code Style - Code Templates
 */
package com.linkage.lcims.base.dao;

import java.io.Serializable;
import java.util.List;

/**
 * @author Administrator
 *
 * TODO To change the template for this generated type comment go to
 * Window - Preferences - Java - Code Style - Code Templates
 */
@SuppressWarnings("unchecked")
public interface HibernateBaseDAO {
	
	public Object loadByID(Class c,Serializable id) throws Exception;
	
	public Object loadByID(String entityName,Serializable id) throws Exception;
	
	public List getAll(Class c) throws Exception;
	
	public List getAll(String entityName) throws Exception;
	
	public Object getByID(Class c,Serializable id) throws Exception;
	
	public Object getByID(String entityName,Serializable id) throws Exception;
	
	public void save(Object o) throws Exception;
	
	public void save(String entityName,Object o) throws Exception;
	
	public void saveOrUpdate(Object o) throws Exception;
	
	public void saveOrUpdate(String entityName,Object o) throws Exception;
	
	public void update(Object o) throws Exception;
	
	public void update(String entityName,Object o) throws Exception;
	
	public void delete(Object o) throws Exception;
	
	public void delete(Class c,Serializable id) throws Exception;
	
	public void delete(String entityName, Serializable id) throws Exception;
	
	public int delete(final String hql) throws Exception;
	
	public int delete(final String hql,final Object[] values) throws Exception;
	
	public List query(String hql) throws Exception;
	
	public List query(String hql,Object value) throws Exception;
	
	public List query(String hql,Object[] values) throws Exception;
	
	public List query(String hql,String paramName,Object value) throws Exception;
	
	public List query(String hql,String[] paramNames,Object[] values) throws Exception;
	
	
}
